<template>
    <div class="PageContainer">
        <div class="left">
            <div class="title">{{data.title}}</div>
            <div class="item-container">
                <div class="item-cell" v-for="item in data.items">
                    <div class="item-title">{{item.title}}</div>
                    <div class="item-value">{{item.value}}</div>
                    <div class="item-unit">{{item.unit}}</div>
                </div>
            </div>
        </div>
        <div class="right">
            <slot></slot>
        </div>
    </div>
</template>

<script setup>
import { defineProps } from 'vue';

const props = defineProps({
  data: {
    type: Object,
    required: true
  }
})
</script>

<style lang="less" scoped>
    .PageContainer{
        width: 100%;
        height: 112px;
        display: flex;
        flex-direction: row;
        background-color: #3040E8;
        border-radius: 32px;
        justify-content: space-between;
        padding: 32px;
        box-sizing: border-box;
        .left{
            height: 100%;
            width: auto;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            .title{
                font-family: LogoSC Unbounded Sans;
                font-weight: 400;
                font-style: Regular;
                font-size: 22px;
                color: #FFFFFF;
            }
            .item-container{
                height: 12px;
                gap:32px;
                display: flex;
                .item-cell{
                    display: flex;
                    color: #FFFFFF;
                    font-size: 12px;
                    gap: 8px;
                }
            }
        }

        .right{
            display: flex;
            flex-direction: row;
            gap: 16px;
        }
    }
</style>